package com.ky.my.service.impl;

import com.ky.common.vo.R;
import com.ky.my.entity.VideoCache;
import com.ky.my.service.VideoCacheService;
import com.ky.my.mapper.VideoCacheMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author hmt
 * @since 2024-06-19
 */
@Service
public class VideoCacheServiceImpl extends ServiceImpl<VideoCacheMapper, VideoCache> implements VideoCacheService {
    @Autowired
    private VideoCacheMapper videoCacheMapper;
    @Override
    public R findAllVideoCache() {
        List<VideoCache> videoCaches = videoCacheMapper.selectList(null);
        return R.ok(videoCaches);
    }

    @Override
    public R deleteVideoCacheById(Integer vudeoId) {
        int i = videoCacheMapper.deleteById(vudeoId);
        return R.ok(i);
    }
}
